import os
import re
import sys
import argparse
from typing import List
from graph_analyzer.processor import process


def main():
    parser = argparse.ArgumentParser(description="IR Parser")
    parser.add_argument('--ir', type=str, required=True, help="Path to the graph file")
    parser.add_argument('--data', type=str, required=False, default=None, help="Path to data dir")
    parser.add_argument('--node-list', type=str, required=False, default=None, help="Error node list")
    parser.add_argument('--output', type=str, required=False, default="./", help="Path to output dir")
    parser.add_argument('--append', action='store_true', help="Whether to append to the CSV file if it exists")
    args = parser.parse_args()
    
    process(args)


if __name__ == "__main__":
    main()
